package com.BlogPark.service.ManagerService.Impl;

import com.BlogPark.mapper.ManageUserMapper;
import com.BlogPark.pojo.DetailsUser;
import com.BlogPark.service.ManagerService.ManageUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ManageUserServiceImpl implements ManageUserService {

    @Autowired
    private ManageUserMapper manageUserMapper;

    @Override
    public List<DetailsUser> findAllUser() {
        List<DetailsUser> users = manageUserMapper.findAllUser();
        return users;
    }

    @Override
    public int deleteUserById(Integer id) {
        int row = manageUserMapper.deleteByUserId(id);
        return row;
    }

    @Override
    public DetailsUser findById(Integer id) {
        return null;
    }

    @Override
    public int updateUser(DetailsUser user) {
        return 0;
    }
}
